package com.sunwayworld.basemodule.business.batchrevise.resource.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.sunwayworld.basemodule.business.batchrevise.resource.LimsBatchReviseResource;
import com.sunwayworld.basemodule.business.batchrevise.service.LimsBatchReviseService;
import com.sunwayworld.framework.spring.annotation.GikamBean;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogModule;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;

@LogModule("送检单修改")
@RestController
@GikamBean
public class LimsBatchReviseResourceImpl implements LimsBatchReviseResource {

    @Autowired
    private LimsBatchReviseService limsBatchReviseService;

    @Override
    public LimsBatchReviseService getService() {
        return limsBatchReviseService;
    }

    @Log(value = "新增送检单修改", type = LogType.INSERT)
    @Override
    @RequestMapping(method = RequestMethod.POST)
    public Long insert(RestJsonWrapperBean wrapper) {
        return getService().insert(wrapper);
    }

    @Override
    public void batchSubmit(RestJsonWrapperBean wrapper) {
        getService().batchSubmit(wrapper);
    }

    @Override
    public void submitById(Long id, RestJsonWrapperBean wrapper) {
        getService().submitById(id, wrapper);
    }

    @Override
    public void approve(RestJsonWrapperBean wrapper) {
        getService().approve(wrapper);
    }

    @Override
    public void reject(RestJsonWrapperBean wrapper) {
        getService().reject(wrapper);
    }

    @Override
    public void approveById(Long id, RestJsonWrapperBean wrapper) {
        getService().approveById(id, wrapper);
    }

    @Override
    public void rejectById(Long id, RestJsonWrapperBean wrapper) {
        getService().rejectById(id, wrapper);
    }
}
